<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">  <!--IE兼容模式-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="renderer" content="webkit">   <!--国产浏览器高速模式-->
    <meta name="csrf-token" content="{{ csrf_token() }}">
    {{--此处是添加关于手机端和平板端的对应尺寸设置   川 2017-11-28 --}}
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    {{--<!--<script type="text/javascript"> document.write('<meta content="width=device-width,initial-scale=' + screen.width / 1600 + ',maximum-scale=' + screen.width / 1600 + ', user-scalable=0" name="viewport" />'); </script>-->--}}
    <script type="text/javascript">
        document.write('<meta content="width=device-width,initial-scale=' + screen.width / 1600 + ', user-scalable=2" name="viewport" />');
    </script>

    <title>@yield('web_title', config('app.name'))</title>
    <link href="{{ asset('css/sui.min.css') }}" rel="stylesheet">
    <link href="{{ asset('css/sui-append.css') }}" rel="stylesheet">
    <link href="{{ asset('static/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
    <link href="{{ asset('static/template/font-awesome/css/font-awesome.css') }}" rel="stylesheet">
    <link href="{{ asset('css/animate.css') }}" rel="stylesheet">
    <link href="{{ asset('css/style.css') }}" rel="stylesheet">
    <link href="{{ asset('css/common.css') }}" rel="stylesheet">
    <link href="{{ asset('css/styleNew.css') }}" rel="stylesheet">
    <!--yox 框架 3-->
    <script src="{{ asset('yox/js/yox.min.js') }}"></script>
    <script src="{{ asset('yox/js/yox-legacy.min.js') }}"></script>
    <script src="{{ asset('yox/js/yox-router.js') }}"></script>
@yield('css')

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script>
        window.User = {!! Auth::user() !!};
        window.HospitalAuth = {!! Auth::user()->hospital->getAbilities()->pluck('name') !!};
        {{--{--window.HospitalAuth = {!! Auth::user()->hospital->pluck('name') !!};--}}
    </script>
    <style>

        .navbar-static-side {
            position: absolute;
            z-index: 2008;
        }

        @media (min-width: 768px) {
            .navbar-static-side {
                z-index: 1000 !important;
                position: absolute;
                width: 220px;
            }
        }

        body.mini-navbar div#wrapper nav.navbar-static-top ul.navbar-right li {
            width: auto;
        }

    </style>
</head>

<body>
<div id="wrapper">
{{--@if(!$scene->isWestern())--}}
{{--<input type="hidden" id="USERTYPE" value="chinese">--}}
{{--@else--}}
{{--<input type="hidden" id="USERTYPE" value="western">--}}
{{--@endif--}}
<!--左侧导航菜单-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <!--头像和信息-->
                <li class="nav-header">
                    <div class="dropdown profile-element">
                        <span><img alt="image" class="img-circle" src="{{ asset('images/blueLogo.png') }}"/></span>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <span class="clear">
                                <span class="block m-t-xs padding-left-10">
                                    {{--显示用户名和放置用户类型--}}
                                    <strong class="font-bold"
                                            data-doctors_admin="{{ Auth::user()->isA('nurse') }}"
                                            data-doctor="{{ Auth::user()->isA('doctor') }}"
                                            data-admin="{{ Auth::user()->isAn('admin') }}"
                                            data-id="{{ Auth::user()->id }}"
                                    >{{ Auth::user()->name }}</strong>
                                    <input type="hidden" id="userType" value="{{ isset($type) ? $type : ''}}">
                                </span>
                            </span>
                        </a>
                    </div>
                </li>
                <!--导航列表-->
                <li class="statsGround">
                    {{--<a href="{{ route('comprehensiveStats.ground') }}" class="listNav" data-index="statsground"><i></i>--}}
                    <a href="{{ route('dashboard.index') }}" class="listNav" data-index="statsground"><i></i>
                        <span class="nav-label">综合统计</span>
                    </a>
                </li>
                <li class="user_admin">
                    @if(!Auth::user()->isDoctor())
                        <a href="{{ route('reservation.user') }}" class="listNav" data-index="user_admin"><i></i>
                            <span class="nav-label">用户管理</span></a>
                    @endif
                </li>
                <li class="medical_search">
                    <a href="{{ route('manage.view.search') }}" class="listNav" data-index="medical_search"><i></i>
                        <span class="nav-label">病历搜索</span></a>
                </li>
                <li class="caseList">
                    <a href="{{ route('manage.view.index') }}" class="listNav" data-index="caseList"><i></i> <span
                                class="nav-label">病历列表</span></a>
                </li>
                <li class="addFirstCase">
                    <a href="{{ route('manage.view.store') }}" class="listNav" data-index="addFirstCase"><i></i> <span
                                class="nav-label">添加病历</span></a>
                </li>
                {{--<li class="AddVisitCase">--}}
                {{--<a href="{{ route('manage.view.subsequent') }}" class="listNav" data-index="AddVisitCase"><i class="fa fa-th-large"></i> <span class="nav-label">添加复诊</span></a>--}}
                {{--</li>--}}
                {{--<li class="addReservation">--}}
                {{--<a href="{{ route('reservation.create', [14496]) }}" class="listNav" data-index="addReservation"><i></i> <span class="nav-label">添加预约</span></a>--}}
                {{--</li>--}}
                @if(Auth::user()->isAdmin() || Auth::user()->hospital->type == 1 )
                    <li class="reservationCenter">
                        <a href="{{ route('reservation.platform') }}" class="listNav"
                           data-index="reservationCenter"><i></i> <span class="nav-label">预约中心</span></a>
                    </li>

                    {{--<li class="doctorManagement">--}}
                    {{--<a href="{{ route('reservation.manage') }}" class="listNav" data-index="doctorManagement">--}}
                    {{--<i></i>--}}
                    {{--<span class="nav-label">--}}
                    {{--@if(Auth::user()->isA('doctor'))--}}
                    {{--预约设置--}}
                    {{--@else--}}
                    {{--医生管理--}}
                    {{--@endif--}}
                    {{--</span>--}}
                    {{--</a>--}}
                    {{--</li>--}}

                    @if(Auth::user()->isDoctor())
                        <li class="doctorManagement">
                            <a href="{{ route('reservation.manage') }}" class="listNav" data-index="doctorManagement">
                                <i></i>
                                <span class="nav-label">预约设置</span>
                            </a>
                        </li>
                    @else
                        {{--<li class="doctorManagement">--}}
                            {{--<a href="{{ route('reservation.manage') }}" class="listNav" data-index="doctorManagement">--}}
                                {{--<i></i>--}}
                                {{--<span class="nav-label">医生管理</span>--}}
                            {{--</a>--}}
                        {{--</li>--}}

                    @endif


                @endif
                {{--@if(Auth::user()->hospital->can('reservation') || Auth::user()->isAn('admin'))--}}

                {{--@endif--}}
                <li class="eyeGround">
                    <a href="{{ route('eye.ground') }}" class="listNav" data-index="eyeground"><i></i>
                        <span class="nav-label">眼底档案</span></a>
                </li>


            </ul>

        </div>
    </nav>
    <!--右侧内容-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <!--操作区域-->
        {{--<button type="button" class="btn btn-primary but_Fonts" id="test2">停止</button>--}}
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <a class="navbar-minimalize minimalize-styl-2 btn btn-primary" href="#"><i class="fa fa-bars"></i>
                    </a>
                </div>
                <ul class="nav navbar-top-links navbar-right">
                    <li>
                        <span class="m-r-sm text-muted welcome-message">{{ config('app.name') }}</span>
                    </li>
                    <li>
                        <a id="logout" href="{{ route('manage.logout') }}">
                            <i class="fa fa-sign-out"></i> 退出
                        </a>
                    </li>
                </ul>
            </nav>
        </div>

        <!--todo 内容区域-->
        @yield('content')

    </div>
    <!--加载中-->
    <div class="loading display-none">
        <div>
            <img src="{{ asset('images/loading.gif') }}">
        </div>
    </div>
</div>


<!-- Mainly scripts -->
<script src="{{ asset('js/jquery.1.12.4.min.js') }}"></script>
<script>
    $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        },
        statusCode: {
            422: function (data) {
                var mess = eval('(' + data.responseText + ')');
                for (var key in mess) {
                    $.alert({
                        title: '温馨提示',
                        body: mess[key],
                        transition: true
                    });
                    break;
                }
            }
        }
    });
</script>
<script src="{{ asset('static/bootstrap/js/bootstrap.min.js') }}"></script>
<script src="{{ asset('static/template/js/jquery.metisMenu.js') }}"></script>
<script src="{{ asset('static/template/js/jquery.slimscroll.min.js') }}"></script>

<!-- Custom and plugin javascript -->
<script src="{{ asset('static/template/js/hplus.js?v=2.2.0') }}"></script>
<script src="{{ asset('static/template/js/pace.min.js') }}"></script>
<!--sui 1-->
<script src="{{ asset('js/sui.min.js') }}"></script>


<!--页码-->
<script src="{{ asset('js/jqPaginator.js') }}"></script>

<script>
    //导航栏点击添加病历  清空病历id 患者id 和 标签页存储的id
    $('#side-menu li.addFirstCase').click(function () {
        sessionStorage.removeItem('tabPage');
        sessionStorage.removeItem('record_id');
        sessionStorage.removeItem('patient_id');
        sessionStorage.removeItem('patientPhone');
    });
    //导航栏点击添加病历  清空病历id 患者id 和 标签页存储的id
    $('#side-menu li.caseList').click(function () {
        sessionStorage.removeItem('patientPhone');
    });
    //导航栏点击预约中心   清空标签页存储的id
    $('#side-menu li.reservationCenter').click(function () {
        sessionStorage.removeItem('reservationCenterTabPage');
    });
    $("#logout").click(function () {
        sessionStorage.clear();
    });


</script>
<script src="{{ asset('js/jquery.cookie.js') }}"></script>
<script src="{{ asset('js/json2.js') }}"></script>
<script src="{{ asset('js/SG_polling.js') }}"></script>
@yield('js')
</body>

</html>